C64 Maze Code a no-go on the Apple II
January 09, 2014 Filed in:
Software | Vintage | Apple IIOn a Commodore 64, the following line of code does something pretty amazing:
10 PRINT CHR$(205.5+RND(1));: GOTO 10
It randomly generates this:
It looks just like a maze! Cool!
I wanted to see if it worked on my Apple II. Sadly, it just spits out a bunch of M’s and N’s.
I Googled to see why. As it turns out, the "/" and "\" on a C64 are actually graphics characters from the PETSCII character set, and not just slashes. The Apple II doesn’t use the PETSCII character set. If you play around with the code, you can get close, but it’s not as “pretty”.
10 PRINT CHR$(47+(INT(RND(1)+.5)*45));: GOTO 10
It’s just not the same. The slashes don’t connect, so it doesn’t make for much of a maze.
Oh well. That would have been cool to watch.